<template>
	<view class="personal">
		<view class="line telephone">
			联系方式：
			<text v-show="vip" class="text">{{ fromData.telephone }}</text>
			<text v-show="!vip" class="memberView">加入会员查看</text>
		</view>
		<view class="line wechat_id">
			微信号：
			<text v-show="vip" class="text">{{ fromData.wechat_id }}</text>
			<text v-show="!vip" class="memberView">加入会员查看</text>
		</view>
		<view class="line email">
			邮箱：
			<text v-show="vip" class="text">{{ fromData.email }}</text>
			<text v-show="!vip" class="memberView">加入会员查看</text>
		</view>
		<map name="map" @click="navApp" :title="fromData.name" class="map" :latitude="fromData.latitude" :longitude="fromData.longitude"></map>
		<view class="adderss" @click="navApp">
			<image class="icon" src="/static/images/adderss.png" mode=""></image>
			<view class="text">
				{{ fromData.address }}
			</view>
		</view>
		<view class="line bottom wechat_id">
			<view class="title">核心优势</view>
			<view class="text">{{ fromData.advantage }}</view>
		</view>
		<view class="line bottom wechat_id">
			<view class="title">业务介绍</view>
			<view class="text">{{ fromData.business }}</view>
		</view>
		<view class="line bottom wechat_id no-border">
			<view class="title">公司/组织/个人简介</view>
			<view class="text">{{ fromData.desc }}</view>
		</view>
	</view>
</template>

<script>
	import { mapNav } from '@/utils/mixins.js';
	export default {
		name: 'personal',
		mixins: [mapNav],
		props: {
			fromData: {
				type: Object,
				default: () => {},
			},
			myShare: false,
		},
		computed: {},
		data() {
			return {
				vip: false,
			};
		},
		mounted() {
			const { vip } = uni.getStorageSync('loginData');
			this.vip = this.myShare || vip != 0;
		},
		methods: {
			},
	};
</script>

<style lang="scss" scoped>
	.personal {
		width: $connet-width;
		margin: $submargin-width auto;
		border-radius: $submargin-width;
		background-color: #fff;
		overflow: hidden;

		.line {
			color: #999999;
			margin: $submargin-width;
			font-size: $uni-font-size-12;
			.text {
				color: #000000;
			}
			.memberView {
				display: inline-block;
				color: #1fc28b;
				font-size: $uni-font-size-10;
				border-radius: 6rpx;
				border: 1rpx solid #1fc28b;
				// width: 130rpx;
				padding: 0 10rpx;
				height: 30rpx;
				text-align: center;
				line-height: 30rpx;
			}
		}
		.map {
			width: 650rpx;
			height: 200rpx;
			margin: $submargin-width;
		}
		.adderss {
			width: 650rpx;
			display: flex;
			align-items: center;
			margin: 0 auto;
			font-size: $uni-font-size-10;
			color: #999999;
			padding-bottom: $submargin-width;
			border-bottom: 1rpx solid #dddddd;
			.icon {
				width: 25.33rpx;
				height: 28rpx;
				margin-right: 10rpx;
			}
		}
		.bottom {
			width: 650rpx;
			margin: 0 auto;
			.title {
				margin: $submargin-width 0;
			}
			padding-bottom: $submargin-width;
			border-bottom: 1rpx solid #dddddd;
		}
	}
</style>
